package com.wu;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
public class ResttFulController {
    /**
     * 测试：在如果换成POST 将会报错：我们使用浏览器地址栏进行访问默认是Get请求
     * @param model
     * @return
     */
    @RequestMapping(value = "/wu",method = {RequestMethod.GET})
    public String index2(Model model){
       model.addAttribute("msg", "数据获取成功");
////       //转发
//       return "forward:/index.jsp";
      //  重定向
        return "redirect:/index.jsp";
    }
}
